<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<h:head>
	<title>Register Member</title>
	<style type="text/css">
body {
	background-image: url("images/bg-logon.gif");
	width: 1000px;
	margin: 0 auto;
	padding-top: 55px;
}

.error{
color:red;
}
</style>
</h:head>
<h:body>
	<h1>Wellcome to Online Testing System</h1>
	<fieldset style="width: 370px;border: none;">
		<legend>Logon</legend>
		<h:form>
			<h:panelGrid columns="3" bgcolor="pink">
		 User name:
		<h:inputText id="uN" value="#{user.userName}" required="true"
					requiredMessage="Username is required" validatorMessage="Username must between 6 and 20 characters.">
					<f:validateLength minimum="6" maximum="20"></f:validateLength>
					</h:inputText>
				<h:message styleClass="error" for="uN"></h:message>
		Password:
		<h:inputSecret id="pS" value="#{user.password}" required="true"
					requiredMessage="Password is required"></h:inputSecret>
         <h:message styleClass="error" for="pS"></h:message>
				<h:inputHidden></h:inputHidden>
				<h:commandButton action="#{user.logon}" value="Login"></h:commandButton>
			</h:panelGrid>
			<h:outputText styleClass="error" value="#{user.message}"></h:outputText>
		</h:form>
	</fieldset>

</h:body>
</html>